package com.weds.edpf.core.service;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.List;

import com.weds.core.base.BaseService;
import com.weds.edpf.core.mapper.NDeviceMonitorMapper;
import com.weds.edpf.core.entity.NDeviceMonitorEntity;

/**
 * @Author sxm
 * @Description NDeviceMonitor管理
 * @Date 2020-06-12
 */
@Service
public class NDeviceMonitorService extends BaseService {

    @Autowired
    private NDeviceMonitorMapper nDeviceMonitorMapper;

    private Logger log = LogManager.getLogger();

    public int deleteByPrimaryKey(Integer xh) {
        return nDeviceMonitorMapper.deleteByPrimaryKey(xh);
    }

    public int insert(NDeviceMonitorEntity record) {
        return nDeviceMonitorMapper.insert(record);
    }

    public int insertSelective(NDeviceMonitorEntity record) {
        return nDeviceMonitorMapper.insertSelective(record);
    }

    public NDeviceMonitorEntity selectByPrimaryKey(Integer xh) {
        return nDeviceMonitorMapper.selectByPrimaryKey(xh);
    }

    public int updateByPrimaryKeySelective(NDeviceMonitorEntity record) {
        return nDeviceMonitorMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(NDeviceMonitorEntity record) {
        return nDeviceMonitorMapper.updateByPrimaryKey(record);
    }

    public List<NDeviceMonitorEntity> selectListByEntity(NDeviceMonitorEntity record) {
        return nDeviceMonitorMapper.selectListByEntity(record);
    }


    public int deleteBatchByKeys(List<NDeviceMonitorEntity> list) {
        return nDeviceMonitorMapper.deleteBatchByKeys(list);
    }

    public int insertBatch(List<NDeviceMonitorEntity> list) {
        return nDeviceMonitorMapper.insertBatch(list);
    }

    public int countOnlineOrDev(List<Integer> list, @Param("onlineState") Integer onlineState) {
        return nDeviceMonitorMapper.countOnlineOrDev(list, onlineState);
    }

    public int countUpdate(List<Integer> list) {
        return nDeviceMonitorMapper.countUpdate(list);
    }

    public int countDownData(List<Integer> list) {
        return nDeviceMonitorMapper.countDownData(list);
    }

    public List<NDeviceMonitorEntity> monitorList(List<Integer> list) {
        return nDeviceMonitorMapper.monitorList(list);
    }
}
